package com.example.demo.contorller;

import java.util.Date;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestContorller  {
	
	int count = 1;
	
	@GetMapping("/test1/{ss}")
	public String test1(@PathVariable int ss){
		try {
			Thread.sleep(ss*1000);
			System.out.println("延迟"+ss+"秒钟");
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "第"+ count++ +"调用"+new Date();
	}
}
